Golang - Hello World!


不免俗的第一篇當然就是要來 Run Hello World 啊。


main.go

package main

import "fmt"

func main() {
    fmt.Println("Hello World!")
}

直接 Run

$ go run main.go

Build 執行檔

$ go build main.go
$ ./main
#golang #GO







你可能感興趣的文章

建立映像檔使用Dockerfile

建立映像檔使用Dockerfile

什麼是 Command Line (CLI)?

什麼是 Command Line (CLI)?

Laravel 7 passing collection to anonymous components

Laravel 7 passing collection to anonymous components






留言討論